package com.qf.boot.service.provider.impl;

import com.qf.boot.service.api.SiteService;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;


//@Service(version = "default")//protocol = "protocol2"
@Service(version = "default",loadbalance = "roundrobin")
public class DefaultSiteServiceImpl implements SiteService {
    public String getName(String name) {
        URL url = RpcContext.getContext().getUrl();
        return String.format("%s:%s,Hello,%s",url.getProtocol(),url.getPort(),name);
    }
}
